<?php if (!empty($errors)) { ?>
<div class="errorwrapper">
<div class="errorcontent">
    <h3 style="color: #DA0606;">O formulário contêm <?php echo count($errors); ?> erro(s):</h3>
	<br />
    <ul>
        <?php 
			foreach ($errors as $field => $fieldErrors) {
				for($i = 0; $i < sizeof($fieldErrors);$i++){
					if ($field == "Image") {
						for($c = 0; $c < sizeof($fieldErrors[$i]["attachment"]);$c++){
							echo "<li>". $fieldErrors[$i]["attachment"][$c] . "</li>";
						}
					} else {
						echo "<li>$fieldErrors[$i]</li>";
					}
				}
			}
		?>
    </ul>
</div>
</div>
<br />
<?php } ?>